package com.line.model.entity;

import org.springframework.format.annotation.DateTimeFormat;
import org.hibernate.annotations.DynamicInsert;
import javax.persistence.GeneratedValue;
import javax.persistence.Column;
import javax.persistence.GenerationType;
import java.util.Date;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "auth_res")
public class AuthResEntity implements java.io.Serializable {

	private static final long serialVersionUID = -1L;

	/**
	 * 主键ID，自增长
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", nullable = false, unique = true, length = 20)
	private Long id;
	/**
	 * 创建时间，仅用于维护；
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "gmt_create", nullable = false)
	private Date gmtCreate;

	/**
	 * 更新时间，仅用于维护；
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "gmt_update", nullable = false)
	private Date gmtUpdate;


	/**
	 * 接口一级访问路径，不同服务的访问路劲不一致。
	 */
	@Column(name = "prefix", length = 32)
	private String prefix;

	/**
	 * 接口访问路径，真实访问路径需要加上一级访问路径。
	 */
	@Column(name = "path", nullable = false, length = 128)
	private String path;

	/**
	 * 接口名称
	 */
	@Column(name = "name", nullable = false, length = 128)
	private String name;

	/**
	 * 接口描述
	 */
	@Column(name = "remark", nullable = false)
	private String remark;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public Date getGmtUpdate() {
		return gmtUpdate;
	}

	public void setGmtUpdate(Date gmtUpdate) {
		this.gmtUpdate = gmtUpdate;
	}

	public String getPrefix() {
		return prefix;
	}

	public void setPrefix(String prefix) {
		this.prefix = prefix;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
}
